<template>
	<router-view v-slot="{ Component, route }">
		{{ route.name }}
		<keep-alive>
			<component :is="Component" v-if="route.meta?.keepAlive"></component>
		</keep-alive>
		<component :is="Component" v-if="!route.meta?.keepAlive"></component>
	</router-view>

	<!-- <router-view v-slot="{ Component }">
		<KeepAlive>
			<component :is="Component" v-if="route.meta?.keepAlive"></component>
		</KeepAlive>
		<component :is="Component" v-if="!route.meta?.keepAlive"></component>
	</router-view> -->
</template>

<script setup lang="ts">
import { useRoute } from 'vue-router'
import { ref, reactive, computed } from 'vue'

const route = useRoute()

const getInclude = (name: any): string[] => {
	return name ? [name] : []
}
</script>

<style lang="scss">
* {
	padding: 0;
	margin: 0;
}

html,
body,
#app {
	width: 100%;
	height: 100%;
}
</style>
